//
//  BLTool.h
//  Byelone
//
//  Created by Qi Liu on 2021/1/31.
//

#import <Photos/Photos.h>
#import <Foundation/Foundation.h>


@interface BLImageModel : NSObject
@property(nonatomic,strong) PHAsset * _Nonnull asset;
@property(nonatomic,strong) NSData * _Nonnull imageData;
@property(nonatomic,strong) UIImage *  _Nonnull image;
@property(nonatomic,strong) NSData * _Nonnull videoData;
@property(nonatomic,assign) BOOL  isVideo;
@property(nonatomic,assign) BOOL  isGif;
@property(nonatomic,assign) BOOL  isImage;

+(BLImageModel *_Nonnull)modelWithUIImage:(UIImage *)image;
@end

typedef NS_ENUM(NSUInteger, UpLoadImageType) {
    UpLoadImageType_Avatar,//头像上传
    UpLoadImageType_Photowall,
    UpLoadImageType_Moment,
    UpLoadImageType_IM,
    UpLoadImageType_Photo,
};

NS_ASSUME_NONNULL_BEGIN

@interface BLTool : NSObject
+(void)upLoadImageArray:(NSArray*)imageArray type:(UpLoadImageType)type success:(void(^)(NSArray *_Nonnull urlArray))success failure:(void(^)(NSString*_Nonnull errorString))failure;

+ (NSString*) getGMTDate;

+ (void)loginWithCompletion:(void(^)(void))over;
+ (void)loginWithCompletion:(void(^)(void))over fail:(void(^)(void))fail;

+(UIViewController *)getCurrentViewController;
+(UINavigationController *)getCurrentNavigationController;

+ (void)getUserData;

+(void)viewBeizerRect:(CGRect)rect view:(UIView *)view corner:(UIRectCorner)corner cornerRadii:(CGSize)radii;

+(NSString *)getUuid;

+(NSString *)URLEncodedString:(NSString *)str;
+(NSString *)URLDecodedString:(NSString *)urlString;




@end

NS_ASSUME_NONNULL_END
